﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DesignDemo
{
    class Program
    {
        static void Main(string[] args)
        {

            #region "Inheritance Version"
            ScoutShip a = new ScoutShip();
            a.FireWeapons();

            ScoutShipVarient_A b = new ScoutShipVarient_A();
            b.FireWeapons();

            List<GameObject> gos = new List<GameObject>();

            gos.Add(a);
            gos.Add(b);

            #endregion

            #region "Component Version"

            WeaponSystem dumbGun = new WeaponSystem("Dumb Gun");
            dumbGun.AddPart(new WPS_RapidFireBullets());

            WeaponSystem megaGun = new WeaponSystem("Mega Gun");
            megaGun.AddPart(new WPS_RapidFireBullets());
            megaGun.AddPart(new WPS_ArmorPiercing());
            megaGun.AddPart(new WPS_TargetTracking());

            SpaceShip scout = new SpaceShip();
            scout.AddWeaponSystem(dumbGun);

            SpaceShip cruiser = new SpaceShip();
            cruiser.AddWeaponSystem(megaGun);

            scout.FireWeapons();
            scout.Reload();
            scout.Update();

            cruiser.FireWeapons();
            cruiser.Reload();
            cruiser.Update();

            #endregion
        }
    }
}
